<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- 框架头 -->
    <script language="JavaScript" src="../FrontFrame/head.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/news.css">
    <script language="JavaScript" src="../js/news.js"></script>
    <title>新闻管理</title>
</head>
<body style='overflow:scroll;overflow-y:hidden'>

  <!-- 搭建显示页面 -->
<div class="container">
    <div class="row">
        <!-- 按钮搜索新闻发布内容-->
        <div class="col-md-2">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="请输入标题" id="title">
                <span class="input-group-btn">
                <button class="btn btn-info"  type="button" onclick="find();" >查找</button>
                </span>
            </div>
        </div>
        <!-- 按钮搜索新闻发布内容-->
        <div class="col-md-2">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="查找发布人" id="name">
                <span class="input-group-btn">
                <button class="btn btn-info"  type="button" onclick="find_name();" >查找</button>
                </span>
            </div>
        </div>
        <div class="col-md-1">
            <button class="btn btn-info" id="news_add_modal_btn"> 添加</button>
        </div>
        <div class="col-md-2">
            <label>类型</label>
            <select id="type" class="form-control">
                <option selected = "selected" value="0">全部</option>
                <option value="1">新闻</option>
                <option value="2">通知</option>
            </select>
        </div>

        <div class="col-md-2">
            <label>发布状态</label>
            <select id="state" class="form-control">
                <option selected = "selected" value="0">全部</option>
                <option value="1">待发布</option>
                <option value="2">发布</option>
                <option value="3">取消发布</option>
            </select></div>
        <div class="col-md-3">
            <label >发布时间</label>
            <input type="date" name="timeFind" id="time_find" >
            <span class="help-block"></span>
        </div>
    </div>
    <hr class="row">
    <!-- 显示表格数据 -->
    <div class="row">
        <div class="col-md-12">
            <table class="table table-hover" id="news_table">
                <thead>
                <tr>
                    <td>
                      <!--  <input type="checkbox" id="check_all"/>-->
                    </td>
                    <td width="20%">标题</td>
                    <td width="6%">信息类型</td>
                    <td width="33%">内容</td>
                    <td width="10%">发布人</td>
                    <td width="10%">发布时间</td>
                    <td width="6%">发布状态</td>
                    <td width="15%">操作</td>
                </tr>
                </thead>
                <tbody></tbody>
            </table>
        </div>
    </div>
    <!-- 显示分页信息 -->
    <div class="row">
        <!-- 分页条信息 -->
        <div class="col-md-4" id="page_nav_area"></div>
        <div class="col-md-6"></div>
        <!--分页文字信息  -->
        <div class="col-md-2"><h5 id="page_info_area"></h5></div>
    </div>
</div>
  <!-- 新闻修改的模态框 -->
  <div class="modal fade" id="newsUpdateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
          <div class="modal-content">
              <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <h4 class="modal-title">新闻修改</h4>
              </div>
              <div class="modal-body">
                  <form class="form-horizontal">
                      <div class="form-group">
                          <label class="col-sm-2 control-label"></label>
                          <div class="col-sm-10">
                              <input type="text" name="id" class="form-control" id="id_update_input" placeholder="id" readonly="readonly" style="display: none">
                              <span class="help-block"></span>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">标题</label>
                          <div class="col-sm-10">
                              <input type="text" name="title" class="form-control" id="title_update_input" placeholder="标题">
                              <span class="help-block"></span>
                          </div>
                      </div>

                      <div class="form-group">
                          <label class="col-sm-2 control-label">信息类型</label>
                          <div class="col-sm-10">
                              <label class="radio-inline">
                                  <input type="radio" name="newsType" id="newsType1_update_input" value="1" checked="checked"> 新闻
                              </label>
                              <label class="radio-inline">
                                  <input type="radio" name="newsType" id="newsType2_update_input" value="2"> 通知
                              </label>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">内容</label>
                          <div class="col-sm-10">
                              <textarea class="form-control" rows="3" name="context" id="context_update_input" placeholder="内容"></textarea>
                          </div>
                      </div>

                      <div class="form-group">
                          <label class="col-sm-2 control-label">发布人</label>
                          <div class="col-sm-10">
                              <input type="text" name="releasePeople" class="form-control" id="releasePeople_update_input" placeholder="发布人">
                              <span class="help-block"></span>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label"></label>
                          <div class="col-sm-10">
                              <input type="text" name="standby1" class="form-control" id="standby1_update_input" readonly="readonly" style="display: none">
                              <span class="help-block"></span>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label"></label>
                          <div class="col-sm-10">
                              <input type="text" name="releaseState" class="form-control" id="releaseState_update_input"   readonly="readonly" style="display: none">
                              <span class="help-block"></span>
                          </div>
                      </div>
                  </form>
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <button type="button" class="btn btn-primary" id="news_update_btn">更新</button>
              </div>
          </div>
      </div>
  </div>



  <!-- 新闻添加的模态框 -->
  <div class="modal fade" id="newsAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
          <div class="modal-content">
              <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <h4 class="modal-title" id="myModalLabel">新闻添加</h4>
              </div>
              <div class="modal-body">
                  <form class="form-horizontal">
                      <div class="form-group">
                          <label class="col-sm-2 control-label">标题</label>
                          <div class="col-sm-10">
                              <input type="text" name="title" class="form-control" id="title_add_input" placeholder="标题">
                              <span class="help-block"></span>
                          </div>
                      </div>

                      <div class="form-group">
                          <label class="col-sm-2 control-label">信息类型</label>
                          <div class="col-sm-10">
                              <label class="radio-inline">
                                  <input type="radio" name="newsType" id="newsType1_add_input" value="1" checked="checked"> 新闻
                              </label>
                              <label class="radio-inline">
                                  <input type="radio" name="newsType" id="newsType2_add_input" value="2"> 通知
                              </label>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">内容</label>
                          <div class="col-sm-10">
                              <textarea class="form-control" rows="3" name="context" id="context_add_input" placeholder="内容"></textarea>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">发布人</label>
                          <div class="col-sm-10">
                              <input type="text" name="releasePeople" class="form-control" id="releasePeople_add_input" placeholder="发布人">
                              <span class="help-block"></span>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label"></label>
                          <div class="col-sm-10">
                              <input type="text" name="standby1" class="form-control" id="standby1_add_input" VALUE="1" readonly="readonly" style="display: none">
                              <span class="help-block"></span>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label"></label>
                          <div class="col-sm-10">
                              <input type="text"  value="1" name="releaseState" class="form-control" id="releaseState_add_input"   readonly="readonly" style="display: none">
                              <!--   <select class="form-control" name="releaseState" id="releaseState_add_input" style="display: none" >
                                    <option>1</option>
                                </select>-->
                              <span class="help-block"></span>
                          </div>
                      </div>
                  </form>
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <button type="button" class="btn btn-primary" id="news_save_btn">保存</button>
              </div>
          </div>
      </div>
  </div>
</body>
</html>